package com.arithmetic.linked;


/**
 *  链表
 */
public class LinkedDemo {

    /**
     * 反转链表
     */
    public  ListNode reverseList(ListNode head){

        ListNode pre=null;
        ListNode der=head;
        ListNode tmp=null;
        while (head.next!=null){
            tmp=head.next;
            head.next=pre;
            head=tmp;
        }

        return null;
    }
}
